package miaofusdk

/**
招行支付的订单数据
*/
type CmbpayRefundOrder struct {
	Id                   int    `json:"id,omitempty,string"`
	OutTradeNo           string `json:"out_trade_no,omitempty"`
	CmbOrder             string `json:"cmb_order,omitempty"`
	RefundTradeNo        string `json:"refund_trade_no,omitempty"`
	ChannelRefundTradeNo string `json:"channel_refund_trade_no,omitempty"`
	CmbRefundNo          string `json:"cmb_refund_no,omitempty"`
	TotalAmount          int    `json:"total_amount"`
	RefundAmount         int    `json:"refund_amount"`
	RealRefundAmount     int    `json:"real_refund_amount"`
	TimeEnd              string `json:"time_end,omitempty"`
	RefundTime           string `json:"refund_time,omitempty"`
	CmbMchId             string `json:"cmb_mch_id,omitempty"`
	StoreCode            string `json:"store_code,omitempty"`
	ShopCode             string `json:"shop_code,omitempty"`
	OrgCode              string `json:"org_code,omitempty"`
	TradeType            string `json:"trade_type,omitempty"`
	StoreName            string `json:"store_name,omitempty"`
	TradeChannel         string `json:"trade_channel,omitempty"`
	TradeStatus          string `json:"trade_status,omitempty"`
	RefundResult         string `json:"refund_result,omitempty"`
	RefundReason         string `json:"refund_reason,omitempty"`
	RefundOperId         string `json:"refund_oper_id,omitempty"`
	TerminalCode         string `json:"terminal_code,omitempty"`
}

type CmbpayOrder struct {
	Id                  int    `json:"id,omitempty,string"`
	OutTradeNo          string `json:"out_trade_no,omitempty"`
	CmbOrder            string `json:"cmb_order,omitempty"`
	DownTradeNo         string `json:"down_trade_no,omitempty"`
	TotalAmount         int    `json:"total_amount"`
	BuyerUserName       string `json:"buyer_user_name,omitempty"`
	BuyerUserId         string `json:"buyer_user_id,omitempty"`
	ActualPayAmount     int    `json:"actual_pay_amount"`
	ReceiptAmount       int    `json:"receipt_amount"`
	PayFee              int    `json:"pay_fee"`
	ChannelTradeNo      string `json:"channel_trade_no,omitempty"`
	RequestTradeNo      string `json:"request_trade_no,omitempty"`
	PayTime             string `json:"pay_time,omitempty"`
	CreateTime          string `json:"create_time,omitempty"`
	PayProductNo        string `json:"pay_product_no,omitempty"`
	DiscountGoodsDetail string `json:"discount_goods_detail,omitempty"`
	VoucherDetailList   string `json:"voucher_detail_list,omitempty"`
	FundBillList        string `json:"fund_bill_list,omitempty"`
	BankType            string `json:"bank_type,omitempty"`
	TradeStatus         string `json:"trade_status,omitempty"`
	CmbMchId            string `json:"cmb_mch_id,omitempty"`
	StoreCode           string `json:"store_code,omitempty"`
	ShopCode            string `json:"shop_code,omitempty"`
	OrgCode             string `json:"org_code,omitempty"`
	BarCode             string `json:"bar_code,omitempty"`
	Subject             string `json:"subject,omitempty"`
	Attach              string `json:"attach,omitempty"`
	TerminalCode        string `json:"terminal_code,omitempty"`
	OperId              string `json:"oper_id,omitempty"`
	GoodsDetail         string `json:"goods_detail,omitempty"`
	BatchNo             int    `json:"batch_no,omitempty"`
	UndiscountableAmt   string `json:"undiscount_amount,omitempty"`
	TradeType           string `json:"trade_type,omitempty"`
	StoreName           string `json:"store_name,omitempty"`
	TradeChannel        string `json:"trade_channel,omitempty"`
	CodeUrl             string `json:"code_url,omitempty"`
	CancelTime          string `json:"cancel_time,omitempty"`
	IsRollBack          bool   `json:"is_roll_back"`
}

type RespCmbpayOrderDetail struct {
	//订单数据
	Order CmbpayOrder `json:"order,omitempty"`
	//这笔订单下包含的所有退款成功和撤单成功的记录
	RefundOrder []CmbpayRefundOrder `json:"refund_order,omitempty"`
}

type RespCmbpayOrder struct {
	Response
	Data RespCmbpayOrderDetail `json:"data,omitempty"`
}

/**
订单详情..
交易成功的直接返回.
非成功的.主动确认一次
*/
